package com.tianlang.web.service.controller;

import org.apache.log4j.Logger;
import org.json.JSONObject;
import org.springframework.context.annotation.Scope;
import org.springframework.ui.Model;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RequestMethod;
import org.springframework.web.bind.annotation.RestController;

/**
 * 
 * @author mcp
 *
 */
@RestController
@Scope("prototype")
@RequestMapping("/server/index")
public class ServerIndexController {

	private static final Logger log = Logger.getLogger(ServerIndexController.class);

	@RequestMapping(value = "", method = RequestMethod.POST)
	public String index(String json, String sid, Model model) {
		log.info("/server/index");
		JSONObject jsonD = new JSONObject();
		jsonD.append("name", "小马");
		return jsonD.toString();
	}
}
